<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateAccostLog extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('accost_log', function (Blueprint $table) {
            //
            $table->bigIncrements('id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->text('token_data')->comment('token');
            $table->longText('data')->comment('查询查来的值');
            $table->tinyInteger('version_flag')->default(0)->comment('新版本 1 老版本2');
            $table->longText('request_data')->comment('请求数据');
            $table->string('to_user_ids', 30)->default('')->comment('发送给的人');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('accost_log');
    }
}
